rotten to the core
Thoroughly bad, as in
It seems that this police unit is rotten to the core, involved in numerous extortion schemes
. The noun
core
here denotes the central part or heart of anything or anyone. The idiom was first recorded in 1804.